package com.wondertek.service.dto.app.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

/**
 * @description: 校验邮箱验证码
 * @author: qinjianhui
 * @create: 2024-07-29 14:24
 **/
@Data
public class AppAuthCheckCodeReq {
    /*
     * 邮箱
     * */
    @NotBlank(message = "email.not.null")
    @Pattern(regexp = "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@"
            + "(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$", message = "verify.email")
    @Schema(name = "email",description = "邮箱")
    private String email;

    /*
     * 验证码
     * */
    @NotBlank(message = "captcha.not.null")
    @Schema(name = "code",description = "验证码")
    private String code;
}

